//
//  UIView+Frame.m
//  Weibo
//
//  Created by student on 16/4/25.
//  Copyright © 2016年 Afash. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)

-(void)setX_:(CGFloat)x
{
    CGRect frame = self.frame;
    frame.origin.x = x;
    self.frame = frame;
}
-(void)setY_:(CGFloat)y
{
    CGRect frame = self.frame;
    frame.origin.y = y;
    self.frame = frame;
}
-(void)setWidth_:(CGFloat)width
{
    CGRect frame = self.frame;
    frame.size.width = width;
    self.frame = frame;
}
-(void)setHeight_:(CGFloat)height
{
    CGRect frame = self.frame;
    frame.size.height = height;
    self.frame = frame;
}
-(CGFloat)x_
{
    return self.frame.origin.x;
}
-(CGFloat)y_
{
    return self.frame.origin.y;
}
-(CGFloat)width_
{
    return self.frame.size.width;
}
-(CGFloat)height_
{
    return self.frame.size.height;
}
@end
